package com.hailiao.beidou.message.bd.constant

import com.hailiao.beidou.standard2.TX_Type
import com.hailiao.beidou.standard3.TC_CodeType

enum class TextType(val value2: TX_Type, val value3: TC_CodeType, val text: String) {

    CODE(TX_Type.CODE, TC_CodeType.CODE, "代码"),
    CHINESE(TX_Type.CHINESE, TC_CodeType.CHINESE, "汉字"),
    MIX(TX_Type.MIX, TC_CodeType.MIX, "混编"),

    ;

    companion object {
        fun parse2(value: TX_Type) = entries.find { it.value2 == value } ?: CODE
        fun parse3(value: TC_CodeType) = entries.find { it.value3 == value } ?: CODE
    }
}